from __future__ import division
from jinja2.runtime import LoopContext, TemplateReference, Macro, Markup, TemplateRuntimeError, missing, concat, escape, markup_join, unicode_join, to_string, TemplateNotFound
name = '/admin/edit.html'

def root(context, environment=environment):
    parent_template = None
    block_context = context._block()
    if 0: yield None
    parent_template = environment.get_template('blog/admin/base.html', '/admin/edit.html')
    for name, parent_block in parent_template.blocks.iteritems():
        context.blocks.setdefault(name, []).append(parent_block)
    for event in parent_template.root_render_func(context):
        yield event

def block_body(context, environment=environment):
    l_edit = context.resolve('edit')
    l_form = context.resolve('form')
    t_1 = environment.filters['safe']
    if 0: yield None
    yield u'\n<div class="block">\n\t<div class="hd">\n\t\t<h2>Admin: '
    if l_edit:
        if 0: yield None
        yield u'Edit Existing '
    else:
        if 0: yield None
        yield u'Create New'
    yield u' Post</h2>\n\t</div>\n    <div class="bd">\n'
    def macro():
        t_2 = []
        l_form = context.resolve('form')
        pass
        t_2.extend((
            u'\n\t\t<dl>\n\t\t    <dt>', 
            escape(t_1(context.call(environment.getattr(environment.getattr(l_form, 'title'), 'label')))), 
            u' ', 
            escape(t_1(context.call(environment.getattr(environment.getattr(l_form, 'title'), 'errors')))), 
            u'</dt>\n\t\t    <dd>', 
            escape(t_1(context.call(environment.getattr(environment.getattr(l_form, 'title'), 'render')))), 
            u'</dd>\n\t\t    <dt>', 
            escape(t_1(context.call(environment.getattr(environment.getattr(l_form, 'body'), 'label')))), 
            u' ', 
            escape(t_1(context.call(environment.getattr(environment.getattr(l_form, 'body'), 'errors')))), 
            u'</dt>\n\t\t    <dd>', 
            escape(t_1(context.call(environment.getattr(environment.getattr(l_form, 'body'), 'render')))), 
            u'</dd>\n\t\t    <dt>', 
            escape(t_1(context.call(environment.getattr(environment.getattr(l_form, 'tags'), 'label')))), 
            u' ', 
            escape(t_1(context.call(environment.getattr(environment.getattr(l_form, 'tags'), 'errors')))), 
            u'</dt>\n\t\t    <dd>', 
            escape(t_1(context.call(environment.getattr(environment.getattr(l_form, 'tags'), 'render')))), 
            u'</dd>\n\t\t    <dt>', 
            escape(t_1(context.call(environment.getattr(environment.getattr(l_form, 'draft'), 'label')))), 
            u' ', 
            escape(t_1(context.call(environment.getattr(environment.getattr(l_form, 'draft'), 'render')))), 
            u' ', 
            escape(t_1(context.call(environment.getattr(environment.getattr(l_form, 'draft'), 'errors')))), 
            u'</dt>\n\t\t\t<dt>&nbsp;</dt>\n\t\t</dl>\t\n\t\t<div class="actions"><input id="btn_submit" type="submit" value="Submit" /></div>\n', 
        ))
        return Markup(concat(t_2))
    caller = Macro(environment, macro, None, (), (), False, False, False)
    yield context.call(l_form, caller=caller)
    yield u'\n\t</div>\n</div>\n<script type="text/javascript" src="/media/admin/js/rteditor.js"></script> \n'

def block_head(context, environment=environment):
    if 0: yield None
    yield u'\n<!-- Combo-handled YUI CSS files: -->\n<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/combo?2.8.0r4/build/assets/skins/sam/skin.css" />\n<!-- Combo-handled YUI JS files: -->\n<script type="text/javascript" src="http://yui.yahooapis.com/combo?2.8.0r4/build/yahoo-dom-event/yahoo-dom-event.js&amp;2.8.0r4/build/container/container_core-min.js&amp;2.8.0r4/build/menu/menu-min.js&amp;2.8.0r4/build/element/element-min.js&amp;2.8.0r4/build/button/button-min.js&amp;2.8.0r4/build/editor/editor-min.js"></script>\n<link rel="stylesheet" type="text/css" href="/media/admin/css/rteditor.css" /> \n'

def block_title(context, environment=environment):
    l_edit = context.resolve('edit')
    if 0: yield None
    yield u'Admin: '
    if l_edit:
        if 0: yield None
        yield u'Edit'
    else:
        if 0: yield None
        yield u'New'
    yield u' Post'

blocks = {'body': block_body, 'head': block_head, 'title': block_title}
debug_info = '1=9&11=15&14=21&17=28&19=34&20=38&21=40&22=44&23=46&24=50&25=52&17=61&29=62&3=64&2=68'